<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sj" tagdir="/WEB-INF/tags/spring-jquery-tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<script type="text/javascript">
	$(document).ready(function() {
		$('#pageTitle').text('<spring:message code="donorlist.heading" />');
		
		$('table.tablesorter').tablesorter({
			widgets : [ 'zebra' ],
			sortList : [ [ 0, 0 ] ],
			headers : {
				8 : {
					sorter : false
				},
				9 : {
					sorter : false
				}
			}
		});

		$('.edit-donor-link').click(function() {
			loadDiv('content', 'showEditDonor.do?id=' + $(this).attr('donorId'));
		});
	});
</script>
<div id="donorListDiv" class="hastable" style="overflow: auto">
	<div class="main_form">
		<table class="tablesorter form_cont">
			<thead>
				<tr>
					<th><spring:message code="donorlist.table.heading.name" /></th>
					<th><spring:message code="donorlist.table.heading.acronym" /></th>
					<th><spring:message code="donorlist.table.heading.url" /></th>
					<th><spring:message code="donorlist.table.heading.contactName" /></th>
					<th><spring:message code="donorlist.table.heading.email" /></th>
					<th><spring:message code="donorlist.table.heading.city" /></th>
					<th><spring:message code="donorlist.table.heading.state" /></th>
					<th><spring:message code="donorlist.table.heading.country" /></th>
					<!-- 
					<th><spring:message code="donorlist.table.heading.address1" /></th>
					<th><spring:message code="donorlist.table.heading.zipCode" /></th>
					<th><spring:message code="donorlist.table.heading.phone" /></th>
					<th><spring:message code="donorlist.table.heading.fax" /></th>
					-->
					<%-- <th><spring:message code="donorlist.table.heading.viewAward" /></th>
					<th><spring:message code="donorlist.table.heading.edit" /></th> --%>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${donors}" var="donor">
					<tr>
						<td><a href="javascript://" class="edit-donor-link" donorId="${donor.id}">${donor.donorName}</a></td>
						<td>${donor.donorAcronym}</td>
						<td><a href="${donor.url}" target="_blank">${donor.url}</a></td>
						<td>${donor.contactName}</td>
						<td>${donor.email}</td>
						<td>${donor.city}</td>
						<td>${donor.state.displayName}</td>
						<td>${donor.country.displayName}</td>
						<!-- 
						<td>${donor.address1}</td>
						<td>${donor.zipCode}</td>
						<td>${donor.phone}</td>
						<td>${donor.fax}</td>
						<%-- <td><a href="javascript://" class="view-awards-link" donorId="${donor.id}"><spring:message code="donorlist.table.link.viewAward" /></a></td> --%>
						<td><a href="javascript://" class="edit-donor-link" donorId="${donor.id}"><spring:message code="donorlist.table.link.edit" /></a></td>
						 -->
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<div id="donorListPager"></div>
	</div>
</div>
